package com.wzdigit.wms.basic.mapper.core.transfer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.transfer.TransferDtlGoods;
import com.wzdigit.wms.basic.client.response.transfer.TransferDtlGoodsResponse;
import com.wzdigit.wms.basic.client.response.transfer.TransferManageDtlGoodsResponse;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


/**
 * <p>
 * 调拨单单货品清单 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2021-01-19
 */
@MyBatisRepository
public interface TransferDtlGoodsMapper extends BaseMapper<TransferDtlGoods> {

	/**
	 * 获取调拨单的明细-SN
	 * @param transferHeaderId
	 * @return
	 */
	List<TransferManageDtlGoodsResponse> getListTransferManageDtlGoods(Integer transferHeaderId);
	
	/**
	 * 获取调拨单单货品清单
	 * @param search
	 * @return
	 */
	List<TransferDtlGoodsResponse> selectAll(
			@Param("transferHeaderId")Integer transferHeaderId,
			@Param("startDtlStatus")Integer startDtlStatus, 
			@Param("endDtlStatus")Integer endDtlStatus);
	
	/**
	 * 批量修改SN状态为已完成
	 * @param date
	 * @param loginName
	 * @param transferGoodsIds
	 * @return
	 */
	int updateStatus(@Param("date")Date date, @Param("loginName")String loginName, 
			@Param("transferGoodsIds")List<Integer> transferGoodsIds);
}
